<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
 <head>
  <title>题库</title>
  <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  <script type="text/javascript" src="plug-in/ckeditor_new/ckeditor.js"></script>
  <script type="text/javascript" src="plug-in/ckfinder/ckfinder.js"></script>
  <script type="text/javascript">
  //编写自定义JS代码
  </script>
 </head>
  <script type="text/javascript">
 	function name() {
		var type = ${fQuestionPage.type};
		var level = ${fQuestionPage.level};
		var tagId = ${fQuestionPage.tagId};
		var isActive = ${fQuestionPage.isActive};
		var obj = document.getElementById("type");
		var levelOBj = document.getElementById("level");
		var tagIdOBj = document.getElementById("tagId");
		var actOBj = document.getElementById("isActive");
		obj.value = type;
		levelOBj.value = level;
		tagIdOBj.value = tagId;
		actOBj.value = isActive;
		
	}
 </script>
 <body onload="name();">
  <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="fQuestionController.do?doUpdate" tiptype="1">
					<input id="id" name="id" type="hidden" value="${fQuestionPage.id }">
		<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
					<tr>
						<td align="right">
							<label class="Validform_label">
								试题类型:
							</label>
						</td>
						<td class="value">
									<%-- <t:dictSelect field="type" type="list"
										typeGroupCode="" defaultVal="${fQuestionPage.type}" hasLabel="false"  title="试题类型"></t:dictSelect> --%>     
							<select id="type" name="type">
                 				<option value="0" selected>单选</option>
                 				<option value="1">多选</option>
                 				<option value="2">简答</option>
                 				<option value="3">上传</option>
        					</select>    
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">试题类型</label>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								试题级别:
							</label>
						</td>
						<td class="value">
									<%-- <t:dictSelect field="level" type="list"
										typeGroupCode="" defaultVal="${fQuestionPage.level}" hasLabel="false"  title="试题级别"></t:dictSelect>  --%>    
							<select id="level" name="level">
                 				<option value="0" selected>通用知识</option>
                 				<option value="1">专科知识</option>
                 				<option value="2">进阶知识1等</option>
                 				<option value="3">进阶知识2等</option>
                 				<option value="4">进阶知识3等</option>
        					</select> 	  
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">试题级别</label>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								试题标签:
							</label>
						</td>
						<td class="value">
									<%-- <t:dictSelect field="tagId" type="list"
										typeGroupCode="" defaultVal="${fQuestionPage.tagId}" hasLabel="false"  title="试题标签"></t:dictSelect>  --%>    
							<select id="tagId" name="tagId">
							<%String[] fTaglist = (String[])request.getAttribute("fTag");
						    	for(int i=0;i<fTaglist.length;i++){
						    		%>	<option value="<%=i+1%>"><%=fTaglist[i] %></option>
						    	<%} %>
                 				<!-- <option value="0" selected>MYSQL</option>
                 				<option value="1">PHP</option>
                 				<option value="2">ANDROID</option>
                 				<option value="3">JAVA</option>
                 				<option value="4">性格测试</option> -->
        					</select> 	  
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">试题标签</label>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								父试题:
							</label>
						</td>
						<td class="value">
						     	 <input id="parentId" name="parentId" type="text" style="width: 150px" class="inputxt"  
									               datatype="*"
										       value='${fQuestionPage.parentId}'>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">父试题</label>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								题目标题:
							</label>
						</td>
						<td class="value">
						     	 <input id="title" name="title" type="text" style="width: 150px" class="inputxt"  
									               
										       value='${fQuestionPage.title}'>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">题目标题</label>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								试题答案:
							</label>
						</td>
						<td class="value">
						  	 	<textarea id="answer" style="width:600px;" class="inputxt" rows="6" name="answer">${fQuestionPage.answer}</textarea>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">试题答案</label>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								是否激活:
							</label>
						</td>
						<td class="value">
						     	 <%-- <input id="isActive" name="isActive" type="text" style="width: 150px" class="inputxt"  
									               datatype="*"
										       value='${fQuestionPage.isActive}'> --%>
							<select id="isActive" name="isActive">
                 				<option value="0" selected>未激活</option>
                 				<option value="1">激活</option>
        					</select> 
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">是否激活</label>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								创建时间:
							</label>
						</td>
						<td class="value">
									  <input id="createDatetime" name="createDatetime" type="text" style="width: 150px" 
						      						class="Wdate" onClick="WdatePicker()"
									               datatype="*" 
						      						 value='<fmt:formatDate value='${fQuestionPage.createDatetime}' type="date" pattern="yyyy-MM-dd"/>'>    
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">创建时间</label>
						</td>
					</tr>
			</table>
		</t:formvalid>
 </body>
  <script src = "webpage//question/fQuestion.js"></script>		